<ul>
<?
$support = getRecord('xteam_category','code="support"');
$list_supports = getArray('xteam_category','parent_id='.$support['id'],NULL,'id');
if($list_supports){
	foreach($list_supports as $list_support){
		$list_id_support .= $list_support['id'].',';
		$filter_support = 'status=1 AND parent_id IN ('.substr($list_id_support,0,-1).')';
	}
	$get_subbports = getArray('xteam_content',$filter_support,NULL,'parent_id');
	foreach($list_supports as $list_support){
		if($get_subbports){
			foreach($get_subbports as $get_subbport){
				if($list_support['id']==$get_subbport['parent_id']){?>
                    <li class="<?=strtolower($list_support['name'])?>">
                        <?
                        switch($list_support['name']){
                            case 'Yahoo':
                                $link = '<a href="ymsgr:sendim?'.$get_subbport['detail_short'].'"><img align="middle" style="border: medium none;" src="http://opi.yahoo.com/online?u='.$get_subbport['detail_short'].'&amp;m=g&amp;t=2&amp;1=us" alt="'.$get_subbport['name'].'" title="'.$get_subbport['name'].'" /></a>';
                            break;
                            case 'Skype':
                                $link = '<a href="skype:'.$get_subbport['detail_short'].'?chat"><img src="http://mystatus.skype.com/smallclassic/'.$get_subbport['detail_short'].'" alt="'.$get_subbport['name'].'" title="'.$get_subbport['name'].'" /></a>';
                            break;
                            case 'Email':
                                $link = '<a href=mailto:'.$get_subbport['detail_short'].'>'.$get_subbport['detail_short'].'</a>';
                            break;
                            case 'Hotline':
                                $link =$get_subbport['name'].':&nbsp;'.$get_subbport['detail_short'];
                            break;
                        }
						echo $link;
                        ?>
                    </li>
				<?
				}
			}
		}
	}
}
?>
</ul>